package com.boyon.common.request;

import javax.persistence.Transient;

import com.boyon.hbm.criteria.Page;

import lombok.Data;

/**
 * ClassName:RequestEntity <br/>
 * Function: TODO ADD FUNCTION. <br/>
 * Reason: TODO ADD REASON. <br/>
 * Date: 2018年3月14日 下午10:02:53 <br/>
 * 
 * @author sunshulin
 * @version
 * @since JDK 1.8
 * @see
 */
@Data
public class RequestEntity {

	/** grid,treegrid页号 */
	@Transient
	private Integer page;
	/** grid,treegrid开始 */
	@Transient
	private Integer start;
	/** grid,treegrid结果数量 */
	@Transient
	private Integer limit;
	/** combox查询参数 */
	@Transient
	private String query;
	/** grid,treegrid总记录数 */
	@Transient
	private Integer total;
	/**  */
	@Transient
	private String sort;
	/** treegrid异步加载需要用到 */
	@Transient
	private String node;
	/** treegrid显示名称 */
	@Transient
	private String text;
	/** treegrid复选框 */
	@Transient
	private Boolean checked;
	/**  */
	@Transient
	private Boolean expanded;
	/**  */
	@Transient
	private Boolean leaf;

	/**
	 * 
	 * getPage:获取分页信息. <br/>
	 * 
	 * @author sunshulin
	 * @return
	 * @since JDK 1.8
	 */
	public Page page() {
		Page page = new Page();
		page.setStart(start);
		page.setLimit(limit);
		return page;
	}
}
